|
|
|
|
|
|
|
Notice that the server-side VBScript code is hidden from the user, because it is never sent back to the browser. Because the code runs on the server, it can access databases or use custom components, as shown in Figure 31.1. |
|
|
|
|
|
|
|
|
Figure 31.1
Server-side scripting allows you
to create powerful Web Sites. |
|
|
|
|
|
|
|
|
Before you can jump right in and use Active Server Pages, you have to do a little Web server administration. As you know, the files on your Web site are located in a directory on the Web server hard drivefor example, C:\InetPub\wwwroot\financeinfo\. This path is known as the physical directory, because it points to an actual location on the server's hard drive. However, when a user on the Internet wants to access files in this directory, he uses an URL like http://myserver/finance/Monthlyreport.htm. How does Internet Information Server map the address in the URL to the appropriate physical directory? The answer is through the use of virtual directories. |
|
|
|
|
|
|
|
|
In our example, the Web server knows that the virtual directory /finance is really the financeinfo subdirectory. Virtual directories act as an alias to real directories. Virtual directories, as well as many other important aspects of the Web server, are controlled with the Internet Service Manager. (Similarly, Personal Web Server is managed with Personal Web Manager.) Screenshots of Internet Service Manager and Personal Web Manager are shown in Figure 31.2. |
|
|
|
|
|
|
|
|
Creating Virtual Directories for ASP Files |
|
|
|
|
|
|
|
|
The process of creating a virtual directory is simple. Follow these steps: |
|
|
|
|
|
|
|
|
1. Use Windows Explorer or the MS-DOS prompt to create a new physical directory (for example, \Inetpub\wwwroot\test). |
|
|
|
|
|
|
|
|
2. Open the Internet Service Manager, which should have been installed in a program group on your server. |
|
|
|
|
|
|
|
|
|
IIS can be managed remotely if you have administrative authority on the Web server.  |
|
|
|
|
|
|
|